<?php
/**
 * 展会概述相关接口
 * Actutils.php BY My
 * Created by sen at 2021/3/23
 * AgeClub.net @ 2021
 */

namespace app\api\controller\bzh\active;


use app\api\library\Utils;
use app\common\controller\Api;
use think\Db;
use think\Log;
use think\Validate;
use think\Cache;

class Active extends Api
{
    protected $noNeedLogin = ['activelist'];
    protected $noNeedRight = '*';

    /**
     * 获取展会概述关于我们
     */
    public function activelist()
    {
        if ($this->request->isGet()) {
            $list = Db::name('activity')
                ->where('status', '1')
                ->select();
            if(empty($list)){
                $this->error('暂无内容',406);
            }else{
                $list = collection($list)->toArray();
                $result = array( "rows" => $list);
                $this->success('获取活动信息成功', $result, 200);
            }
        }else{
            $this->error('请求方式有误',305);
        }
    }

}
